<#import '/ftlLibrary/properteisVariable.ftl' as pv/>
<div class="row">
	<div class="col-lg-12 col-sm-12 col-xs-12">
		<div class="widget">
			<div class="widget-header bordered-bottom theme">
				<span class="widget-caption">全球城市-${(editModel=='add')?string('新增','编辑')}</span>
				<div class="widget-buttons">
					<a href="#" data-toggle="collapse">
						<i class="fa fa-minus"></i>
					</a>
					<a href="#" data-toggle="maximize">
						<i class="fa fa-expand"></i>
					</a>
				</div>
			</div>
			<div class="widget-body">
				<div class="row">
					<form class="editForm" action="${saveUrl}" method="post" responseType="JSON" role="form" id="editForm_${serializeNum}"
						data-bv-submitButtons="#editFormSubmitBtn_${serializeNum}"
						data-bv-message="This value is not valid"
						data-bv-feedbackicons-valid="glyphicon glyphicon-ok"
						data-bv-feedbackicons-invalid="glyphicon glyphicon-remove"
						data-bv-feedbackicons-validating="glyphicon glyphicon-refresh">
						<input type="hidden" name="formKey" value="${formKey}">
						<input type="hidden" name="formToken" value="${formToken}">
							<input type="hidden" name="id" value="${editEntity.id}">
							<#if (true && editModel=='add')||(true && editModel=='edit')>
							<div class="col-xm-12 col-sm-6 col-lg-4">
								<div class="form-group">
									<label for="pId" class="col-sm-2 control-label no-padding-right">父id</label>
									<div class="col-sm-10">
										<input required="required" data-bv-message="请填写父类id！"maxlength="32" name="pId" alt="父id" id="pId" placeholder="父id" type="text" title="父id" class="form-control"  value="${editEntity.pId}" />
										<span class="text"></span>
									</div>
								</div>
							</div>
							</#if>
							<#if (true && editModel=='add')||(true && editModel=='edit')>
							<div class="col-xm-12 col-sm-6 col-lg-4">
								<div class="form-group">
									<label for="country" class="col-sm-2 control-label no-padding-right">国家</label>
									<div class="col-sm-10">
										<input data-bv-message="请选择用户名！"maxlength="100" name="country" alt="国家" id="country" placeholder="国家" type="text" title="国家" class="form-control"  value="${editEntity.country}" />
										<span class="text"></span>
									</div>
								</div>
							</div>
							</#if>
							<#if (true && editModel=='add')||(true && editModel=='edit')>
							<div class="col-xm-12 col-sm-6 col-lg-4">
								<div class="form-group">
									<label for="name" class="col-sm-2 control-label no-padding-right">名称</label>
									<div class="col-sm-10">
										<input required="required" data-bv-message="请选填写名称！"maxlength="50" name="name" alt="名称" id="name" placeholder="名称" type="text" title="名称" class="form-control"  value="${editEntity.name}" />
										<span class="text"></span>
									</div>
								</div>
							</div>
							</#if>
							<#if (true && editModel=='add')||(true && editModel=='edit')>
							<div class="col-xm-12 col-sm-6 col-lg-4">
								<div class="form-group">
									<label for="firstChar" class="col-sm-2 control-label no-padding-right">首写字母</label>
									<div class="col-sm-10">
										<input data-bv-message="The field is not valid"maxlength="1" name="firstChar" alt="首写字母" id="firstChar" placeholder="首写字母" type="text" title="首写字母" class="form-control"  value="${editEntity.firstChar}" />
										<span class="text"></span>
									</div>
								</div>
							</div>
							</#if>
							<#if (true && editModel=='add')||(true && editModel=='edit')>
							<div class="col-xm-12 col-sm-6 col-lg-4">
								<div class="form-group">
									<label for="pinyin" class="col-sm-2 control-label no-padding-right">全拼</label>
									<div class="col-sm-10">
										<input data-bv-message="The field is not valid"maxlength="100" name="pinyin" alt="全拼" id="pinyin" placeholder="全拼" type="text" title="全拼" class="form-control"  value="${editEntity.pinyin}" />
										<span class="text"></span>
									</div>
								</div>
							</div>
							</#if>
							<#if (true && editModel=='add')||(true && editModel=='edit')>
							<div class="col-xm-12 col-sm-6 col-lg-4">
								<div class="form-group">
									<label for="weight" class="col-sm-2 control-label no-padding-right">权重</label>
									<div class="col-sm-10">
										<input  data-bv-integer-message="The field is number" required="required" data-bv-message="请填写权重！" data-bv-integer="true"maxlength="11" name="weight" alt="权重" id="weight" placeholder="权重" type="text" title="权重" class="form-control"  value="${editEntity.weight}" />
										<span class="text"></span>
									</div>
								</div>
							</div>
							</#if>
							<#if (true && editModel=='add')||(true && editModel=='edit')>
							<div class="col-xm-12 col-sm-6 col-lg-4">
								<div class="form-group has-feedback">
									<label for="isForbidden" class="col-sm-2 control-label no-padding-right">是否禁用</label>
									<div class="col-sm-10">
										<input type="hidden" name="isForbidden" value=${(editEntity.isForbidden???string(editEntity.isForbidden?string('true','false'),'false'))!'false'}>
										<label>
											<input data-target-input-name="isForbidden" data-bv-message="The field is not valid"maxlength="1" alt="是否禁用" id="isForbidden" placeholder="是否禁用" type="checkbox" title="是否禁用" class="form-control checkbox-slider slider-icon yesno"  ${(editEntity.isForbidden???string(editEntity.isForbidden?string('checked',''),''))!''}>
											<span class="text"></span>
										</label>
									</div>
								</div>
							</div>
							</#if>
							<#if (true && editModel=='add')||(true && editModel=='edit')>
							<div class="col-xm-12 col-sm-6 col-lg-4">
								<div class="form-group">
									<label for="longitude" class="col-sm-2 control-label no-padding-right">经度</label>
									<div class="col-sm-10">
										<input data-bv-numeric="true" required="required" data-bv-message="请填写经度！" data-bv-numeric-message="The field is numeric"maxlength="22" name="longitude" alt="经度" id="longitude" placeholder="经度" type="text" title="经度" class="form-control"  value="${editEntity.longitude}" />
										<span class="text"></span>
									</div>
								</div>
							</div>
							</#if>
							<#if (true && editModel=='add')||(true && editModel=='edit')>
							<div class="col-xm-12 col-sm-6 col-lg-4">
								<div class="form-group">
									<label for="latitude" class="col-sm-2 control-label no-padding-right">纬度</label>
									<div class="col-sm-10">
										<input data-bv-numeric="true" required="required" data-bv-message="请填写纬度！" data-bv-numeric-message="The field is numeric"maxlength="22" name="latitude" alt="纬度" id="latitude" placeholder="纬度" type="text" title="纬度" class="form-control"  value="${editEntity.latitude}" />
										<span class="text"></span>
									</div>
								</div>
							</div>
							</#if>
							<#if (true && editModel=='add')||(true && editModel=='edit')>
							<div class="col-xm-12 col-sm-6 col-lg-4">
								<div class="form-group">
									<label class="col-sm-2 control-label no-padding-right">大区</label>
									<div class="col-sm-10">
										<select name="region"class="selectpicker_${serializeNum}"  data-live-search="true">
											<optgroup label="选择所属大区" data-icon="icon-ok">
												<option value="">无</option>
												<option value="华北">华北地区</option>
												<option value="东北">东北地区</option>
												<option value="华东">华东地区</option>
												<option value="中南">中南地区</option>
												<option value="西南">西南地区</option>
												<option value="西北">西北地区</option>
											</optgroup>
										</select>
										<script type="text/javascript">
                                            $("[name='region']").val("${editEntity.region}");
										</script>
                                        <p>1、华北地区：北京,天津,河北省,山西省,内蒙古自治区</p>
                                        <p>1、华北地区：北京,天津,河北省,山西省,内蒙古自治区</p>
                                        <p> 2、东北地区：辽宁省,吉林省,黑龙江省</p>
                                        <p> 3、华东地区：上海,江苏省,浙江省,安徽省,福建省,江西省,山东省</p>
                                        <p>4、中南地区：河南省,湖北省,湖南省,广东省,广西壮族自治区,海南省</p>
                                        <p>5、西南地区：重庆,四川省,贵州省,云南省,西藏自治区</p>
                                        <p>6、西北地区：陕西省,甘肃省,青海省,宁夏回族自治区,新疆维吾尔自治区</p>
									</div>
								</div>
							</div>
							</#if>
							<#if (false && editModel=='add')||(false && editModel=='edit')>
							<div class="col-xm-12 col-sm-6 col-lg-4">
								<div class="form-group">
									<label for="version" class="col-sm-2 control-label no-padding-right">版本</label>
									<div class="col-sm-10">
										<input  data-bv-integer-message="The field is number" data-bv-message="The field is not valid" data-bv-integer="true"maxlength="11" name="version" alt="版本" id="version" placeholder="版本" type="text" title="版本" class="form-control"  value="${editEntity.version}" />
										<span class="text"></span>
									</div>
								</div>
							</div>
							</#if>
						<div class="col-sm-12">
							<input type="button" class="btn btn-default" data-dismiss="modal" value="返回" onclick="backView()"/>
							<button type="submit" class="btn btn-blue" id="editFormSubmitBtn_${serializeNum}">保存</button>
						</div>
					</form>
				</div>
			</div>
		</div>
	</div>
</div>
<script src="assets/js/validation/bootstrapValidator_init.js"></script>
<script>
$(".selectpicker_${serializeNum}").select2();
</script>